package cn.wizzer.app.user.modules.models.enums;

import lombok.Getter;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Getter
public enum ViewStatusEnum {
    FAIL("未通过", -1),
    WAIT("审核中", 0),
    PASS("通过", 1);

    public String name;
    public Integer value;


    ViewStatusEnum(String name, Integer value) {
        this.name = name;
        this.value = value;
    }

    public static List toList() {
        List<Map<String, Object>> list = new ArrayList<>();
        for (ViewStatusEnum exchangeEnum : ViewStatusEnum.values()) {
            Map<String, Object> map = new HashMap<>();
            map.put("name", exchangeEnum.getName());
            map.put("val", exchangeEnum);
            list.add(map);
        }
        return list;
    }

}
